#ifndef NetworkUtils_H
#define NetworkUtils_H

#include "Engine.h"

//methods for going to/from double/bytes
//both return the number of bytes consumed

class Converter{
public:
	int writeConvertedDouble(double toTurn, char *buffer){
		int toT = (int)toTurn;
		SDLNet_Write32(toT, buffer);
		return 4;
	}

	int readConvertedDouble(double *val, char *buffer){
		int v = SDLNet_Read32(buffer);
		*val = v;
		return 4;
	}
};
#endif
